import cn.hutool.core.util.StrUtil;
import com.chen.base.utils.file.IoFileUtil;
import org.junit.jupiter.api.Test;

/**
 * @author: ChenJinLong
 * @DATE: 2024/12/6
 **/
public class NacosJarUtil {

    @Test
    public void partNacosJar(){
        String currPath = System.getProperty("user.dir");
        String path = StrUtil.format("{}\\nacos-server.jar", currPath);
        String partDirPath = StrUtil.format("{}\\part", currPath);
        IoFileUtil.partFile(path, partDirPath, null);
    }

    @Test
    public void mergeNacosJar(){
        String currPath = System.getProperty("user.dir");
        String path = StrUtil.format("{}\\nacos-server.jar", currPath);
        String partDirPath = StrUtil.format("{}\\part", currPath);
        IoFileUtil.mergeFile(partDirPath, path, false, null);
    }

}
